/*
 *
 * SysUserMapper.java
 * Copyright(C) 2017-2020 fendo公司
 * @date 2018-12-04
 */
package com.mass.core.sys.user.dao;

import com.mass.core.sys.menu.model.SysMenu;
import com.mass.core.sys.user.model.SysUser;
import com.mass.core.sys.user.model.SysUserExample;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysUserMapper {

	/**
	 * 根据aPersonalBaseId 删除系统用户
	 */
	int deleteByAPersonalBaseId(SysUser record);

	/**
	 * 查询所有权限
	 * 
	 * @return
	 */
	List<SysMenu> findAutorityAll(@Param("userId") Long userId,
			@Param("parentId") Long parentId);

	/**
	 * 
	 * @Title: findSysUserByUserId
	 * @Description: 根据用户ids 查询用户
	 * @param ids
	 * @return List<SysUser> 返回类型
	 * @throws
	 */
	List<SysUser> findSysUserByUserId(List<Long> ids);

	/**
	 * 
	 * @mbg.generated
	 */
	long countByExample(SysUserExample example);

	/**
	 * 
	 * @mbg.generated
	 */
	int deleteByExample(SysUserExample example);

	/**
	 * 
	 * @mbg.generated
	 */
	int deleteByPrimaryKey(Long id);

	/**
	 * 
	 * @mbg.generated
	 */
	int insert(SysUser record);

	/**
	 * 
	 * @mbg.generated
	 */
	int insertSelective(SysUser record);

	/**
	 * 
	 * @mbg.generated
	 */
	List<SysUser> selectByExample(SysUserExample example);

	/**
	 * 
	 * @mbg.generated
	 */
	SysUser selectByPrimaryKey(Long id);

	/**
	 * 
	 * @mbg.generated
	 */
	int updateByExampleSelective(@Param("record") SysUser record,
			@Param("example") SysUserExample example);

	/**
	 * 
	 * @mbg.generated
	 */
	int updateByExample(@Param("record") SysUser record,
			@Param("example") SysUserExample example);

	/**
	 * 
	 * @mbg.generated
	 */
	int updateByPrimaryKeySelective(SysUser record);

	/**
	 * 
	 * @mbg.generated
	 */
	int updateByPrimaryKey(SysUser record);
}